#include "pagehscbswitch.h"
#include "ui_pagehscbswitch.h"

PageHSCBSwitch::PageHSCBSwitch(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::PageHSCBSwitch)
{
    ui->setupUi(this);
    setAutoFillBackground(true);  //设置自动填充
    QPalette palette = BKGCLR;
    setPalette(palette);

    setPageActive(false);

}

PageHSCBSwitch::~PageHSCBSwitch()
{
    delete ui;
}

void PageHSCBSwitch::on_Btn_Return_clicked()
{
    emit returnToMaintMenu();
}

void PageHSCBSwitch::setPageActive(bool xActive)
{
    ui->Btn_HSCB_1->setEnabled(xActive);
    ui->Btn_HSCB_2->setEnabled(xActive);
    ui->Btn_HSCB_3->setEnabled(xActive);
    ui->Btn_HSCB_4->setEnabled(xActive);
}

void PageHSCBSwitch::on_Btn_HSCB_1_clicked(bool checked)
{
    emit openhscb(0,checked);
}

void PageHSCBSwitch::on_Btn_HSCB_2_clicked(bool checked)
{
    emit openhscb(1,checked);
}

void PageHSCBSwitch::on_Btn_HSCB_3_clicked(bool checked)
{
    emit openhscb(2,checked);
}

void PageHSCBSwitch::on_Btn_HSCB_4_clicked(bool checked)
{
    emit openhscb(3,checked);
}
